package main

import (
	"fmt"
	"strconv"
	"time"
)

func printMsg() {
	for i := 0; i < 5; i++ {
		fmt.Println("hello world" + strconv.Itoa(i))
		time.Sleep(time.Second)
	}
}

func main() {
	go printMsg() // 开启协程

	for i := 0; i < 5; i++ {
		fmt.Println("hello main" + strconv.Itoa(i))
		time.Sleep(time.Second)
	}
}
